﻿using Risk.Services;

namespace Site.Models
{
    /// <summary>
    /// Data transfer object for a troop
    /// </summary>
    public class TroopDTO
    {
        public TroopDTO(int troopId)
        {
            Id = troopId;
        }

        public int Id { get; set; }
        /// <summary>
        /// The region id where this troop is stationed
        /// </summary>
        public string Region { get { return DatabaseManager.GetRegion(Id); } set { DatabaseManager.SetTroopRegion(value, Id); } }

        /// <summary>
        /// The number of military men in this troop
        /// </summary>
        public int Count { get { return DatabaseManager.GetCount(Id); } set { DatabaseManager.SetTroopCount(value, Id); } }
    }
}